package com.baselibrary.adapter

import com.baselibrary.R
import com.baselibrary.bean.ShareItemBean
import com.baselibrary.utils.GlideUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * @author: 关忆北、
 * @date: 2022/3/30
 * @Des：
 */
class ShareFriendsAdapter : BaseQuickAdapter<ShareItemBean, BaseViewHolder>(R.layout.item_share_friend) {

    override fun convert(helper: BaseViewHolder, item: ShareItemBean) {

        helper.setText(R.id.tv_share_title, item.title)
        if (item.icon is String) {
            GlideUtils.loadImg_101(mContext, item.icon as String, helper.getView(R.id.circle_share_icon))
        } else if (item.icon is Int) {
            GlideUtils.loadImg_101(mContext, item.icon as Int, helper.getView(R.id.circle_share_icon))
        }
        helper.addOnClickListener(R.id.rl_share_item)
    }
}